package insight.google.game.era.data;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;


@PersistenceCapable(identityType = IdentityType.APPLICATION,detachable="true")
public class RoomHistory {
	
	/**
	 * 
	 */

	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@PrimaryKey
	private Key id;
	
	@Persistent
	private String roomName;
	
	@Persistent(mappedBy="gameRoom",defaultFetchGroup="true" )
	private List<GameHistory> gameHistoryList = new ArrayList<GameHistory>(); 
	
	public RoomHistory(String name){
		this.roomName = name;
	}
	
	public Key getId() {
		return id;
	}
	public void setId(Key id) {
		this.id = id;
	}
	public String getRoomName() {
		return roomName;
	}
	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}

	public List<GameHistory> getGameHistoryList() {
		return gameHistoryList;
	}

	public void setGameHistoryList(List<GameHistory> gameHistoryList) {
		this.gameHistoryList = gameHistoryList;
	}
	
	
	
	
	
	
	
}
